﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace frp_tool
{
    public static class MyConsole
    {
        private static RichTextBox tb;
        public static void setTextBox(RichTextBox t)
        {
            tb = t;
        }
        public static void write(String str)
        {
            tb.AppendText(DateTime.Now.ToString() + " [I] " + str + "\r\n");
            tb.ScrollToCaret();
        }

        public static void clear()
        {
            tb.Clear();
        }
        public static void error(String str)
        {
            tb.AppendText(DateTime.Now.ToString() + " [E] " + str + "\r\n");
            tb.ScrollToCaret();
        }
        public static void warning(String str)
        {

            tb.AppendText(DateTime.Now.ToString() + " [W] " + str + "\r\n");
            tb.ScrollToCaret();
        }
    }
}
